#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :find_sub_str_40.py
# @Time      :2020/6/23 16:55
# @Author    :Administrator


def check(string, sub_str):
    if (string.find(sub_str) == -1):
        print('不存在！')
    else:
        print('存在！')


def check2(string, sub_str):
    if sub_str in string:
        print('存在!')
    else:
        print('不存在!')


string = 'www.runoob.com'
sub_str = 'runoob'
check(string, sub_str)
check2(string, sub_str)
